We introduce Patch Aligned Contrastive Learning (PACL), a modified compatibility function for CLIP's contrastive loss, intending to train an alignment between the patch tokens of the vision encoder and the CLS token of the text encoder. With such an alignment, a model can identify regions of an image corresponding to a given text input, and therefore transfer seamlessly to the task of open vocabulary semantic segmentation without requiring any segmentation annotations during training. Using pre-trained CLIP encoders with PACL, we are able to set the state-of-the-art on the task of open vocabulary zero-shot segmentation on 4 different segmentation benchmarks: Pascal VOC, Pascal Context, COCO Stuff and ADE20K. Furthermore, we show that PACL is also applicable to image-level predictions and when used with a CLIP backbone, provides a general improvement in zero-shot classification accuracy compared to CLIP, across a suite of 12 image classification datasets.
translated by 谷歌翻译
PyTorch Adapt is a library for domain adaptation, a type of machine learning algorithm that re-purposes existing models to work in new domains. It is a fully-featured toolkit, allowing users to create a complete train/test pipeline in a few lines of code. It is also modular, so users can import just the parts they need, and not worry about being locked into a framework. One defining feature of this library is its customizability. In particular, complex training algorithms can be easily modified and combined, thanks to a system of composable, lazily-evaluated hooks. In this technical report, we explain in detail these features and the overall design of the library. Code is available at https://www.github.com/KevinMusgrave/pytorch-adapt
translated by 谷歌翻译
Modern retrieval system often requires recomputing the representation of every piece of data in the gallery when updating to a better representation model. This process is known as backfilling and can be especially costly in the real world where the gallery often contains billions of samples. Recently, researchers have proposed the idea of Backward Compatible Training (BCT) where the new representation model can be trained with an auxiliary loss to make it backward compatible with the old representation. In this way, the new representation can be directly compared with the old representation, in principle avoiding the need for any backfilling. However, followup work shows that there is an inherent tradeoff where a backward compatible representation model cannot simultaneously maintain the performance of the new model itself. This paper reports our ``not-so-surprising'' finding that adding extra dimensions to the representation can help here. However, we also found that naively increasing the dimension of the representation did not work. To deal with this, we propose Backward-compatible Training with a novel Basis Transformation ($BT^2$). A basis transformation (BT) is basically a learnable set of parameters that applies an orthonormal transformation. Such a transformation possesses an important property whereby the original information contained in its input is retained in its output. We show in this paper how a BT can be utilized to add only the necessary amount of additional dimensions. We empirically verify the advantage of $BT^2$ over other state-of-the-art methods in a wide range of settings. We then further extend $BT^2$ to other challenging yet more practical settings, including significant change in model architecture (CNN to Transformers), modality change, and even a series of updates in the model architecture mimicking the evolution of deep learning models.
translated by 谷歌翻译
在大型数据集上,对视力任务的深度学习模型进行了培训,因为存在一个通用表示,可用于对所有样本进行预测。尽管事实证明,高复杂性模型能够学习此类表示,但对数据的特定子集进行了培训的专家,可以更有效地推断出标签。然而,使用专家的混合物会提出两个新问题,即(i)在提出新的看不见的样本时分配正确的专家。 (ii)找到培训数据的最佳分区,以使专家最依赖于共同特征。在动态路由(DR)中,提出了一个新颖的体系结构,其中每层由一组专家组成,但是在没有解决这两个挑战的情况下,我们证明该模型可以恢复使用相同的专家子集。在我们的方法中,对多元化的动态路由(DIVDR)进行了明确培训,以解决找到数据相关分区并以无监督的方法分配正确的专家的挑战。我们对MS-Coco的城市景观和对象检测以及实例分割进行了几项实验,显示了几个基线的性能的改善。
translated by 谷歌翻译
我们介绍了一种新的图像取证方法:将物理折射物(我们称为图腾)放入场景中,以保护该场景拍摄的任何照片。图腾弯曲并重定向光线,因此在单个图像中提供了多个(尽管扭曲)的多个(尽管扭曲)。防守者可以使用这些扭曲的图腾像素来检测是否已操纵图像。我们的方法通过估计场景中的位置并使用其已知的几何和材料特性来估算其位置,从而使光线通过图腾的光线不十障。为了验证图腾保护的图像,我们从图腾视点重建的场景与场景的外观从相机的角度来检测到不一致之处。这样的方法使对抗性操纵任务更加困难,因为对手必须以几何一致的方式对图腾和图像像素进行修改,而又不知道图腾的物理特性。与先前的基于学习的方法不同,我们的方法不需要在特定操作的数据集上进行培训,而是使用场景和相机的物理属性来解决取证问题。
translated by 谷歌翻译
在图像分类中,在检测分布(OOD)数据时发生了许多发展。但是,大多数OOD检测方法是在一组标准数据集上评估的,该数据集与培训数据任意不同。没有明确的定义``好的''ood数据集。此外,最先进的OOD检测方法已经在这些标准基准上取得了几乎完美的结果。在本文中,我们定义了2类OOD数据使用与分布(ID)数据的感知/视觉和语义相似性的微妙概念。我们将附近的OOD样本定义为感知上相似但语义上与ID样本的不同,并将样本转移为视觉上不同但在语义上与ID相似的点数据。然后,我们提出了一个基于GAN的框架,用于从这两个类别中生成OOD样品,给定一个ID数据集。通过有关MNIST,CIFAR-10/100和Imagenet的广泛实验,我们表明A)在常规基准上表现出色的ART OOD检测方法对我们提出的基准测试的稳健性明显较小。 N基准测试,反之亦然,因此表明甚至可能不需要单独的OOD集来可靠地评估OOD检测中的性能。
translated by 谷歌翻译
本文比较并对11种UDA验证方法进行排名。验证者估计模型的准确性,这使它们成为任何UDA火车测试管道的重要组成部分。我们对这些验证器进行排名,以指示其中哪些最有用的目的是选择最佳模型,检查点和超参数。此外,我们建议并比较新的有效验证器,并显着改进了现有验证器的版本。据我们所知,这项大规模的基准研究是UDA领域中的第一项。
translated by 谷歌翻译
视觉变压器的最新进展在基于点产生自我注意的新空间建模机制驱动的各种任务中取得了巨大成功。在本文中,我们表明,视觉变压器背后的关键要素,即输入自适应,远程和高阶空间相互作用,也可以通过基于卷积的框架有效地实现。我们介绍了递归封闭式卷积($ \ textit {g}^\ textit {n} $ conv),该卷积{n} $ conv)与封闭的卷积和递归设计执行高阶空间交互。新操作是高度灵活和可定制的,它与卷积的各种变体兼容,并将自我注意的两阶相互作用扩展到任意订单,而无需引入大量额外的计算。 $ \ textit {g}^\ textit {n} $ conv可以用作插件模块,以改善各种视觉变压器和基于卷积的模型。根据该操作,我们构建了一个名为Hornet的新型通用视觉骨干家族。关于ImageNet分类,可可对象检测和ADE20K语义分割的广泛实验表明,大黄蜂的表现优于Swin变形金刚,并具有相似的整体体系结构和训练配置的明显边距。大黄蜂还显示出对更多训练数据和更大模型大小的有利可伸缩性。除了在视觉编码器中的有效性外,我们还可以将$ \ textit {g}^\ textit {n} $ conv应用于特定于任务的解码器,并始终通过较少的计算来提高密集的预测性能。我们的结果表明,$ \ textIt {g}^\ textit {n} $ conv可以成为视觉建模的新基本模块,可有效结合视觉变形金刚和CNN的优点。代码可从https://github.com/raoyongming/hornet获得
translated by 谷歌翻译
现在众所周知,神经网络对其预测的信心很高,导致校准不良。弥补这一点的最常见的事后方法是执行温度缩放,这可以通过将逻辑缩放为固定值来调整任何输入的预测的信心。尽管这种方法通常会改善整个测试数据集中的平均校准,但无论给定输入的分类是否正确还是不正确,这种改进通常会降低预测的个人信心。有了这种见解,我们将方法基于这样的观察结果,即不同的样品通过不同的量导致校准误差,有些人需要提高其信心,而另一些则需要减少它。因此,对于每个输入,我们建议预测不同的温度值,从而使我们能够调整较细性的置信度和准确性之间的不匹配。此外,我们观察到了OOD检测结果的改善,还可以提取数据点的硬度概念。我们的方法是在事后应用的,因此使用很少的计算时间和可忽略不计的记忆足迹,并应用于现成的预训练的分类器。我们使用CIFAR10/100和TINY-IMAGENET数据集对RESNET50和WIDERESNET28-10架构进行测试,这表明在整个测试集中产生每数据点温度也有益于预期的校准误差。代码可在以下网址获得:https://github.com/thwjoy/adats。
translated by 谷歌翻译
我们表明,著名的混音的有效性[Zhang等,2018],如果而不是将其用作唯一的学习目标,就可以进一步改善它,而是将其用作标准跨侧面损失的附加规则器。这种简单的变化不仅提供了太大的准确性,而且在大多数情况下,在各种形式的协变量转移和分布外检测实验下,在大多数情况下,混合量的预测不确定性估计质量都显着提高了。实际上,我们观察到混合物在检测出分布样本时可能会产生大量退化的性能,因为我们在经验上表现出来,因为它倾向于学习在整个过程中表现出高渗透率的模型。很难区分分布样本与近分离样本。为了显示我们的方法的功效(RegMixup),我们在视觉数据集(Imagenet&Cifar-10/100)上提供了详尽的分析和实验,并将其与最新方法进行比较,以进行可靠的不确定性估计。
translated by 谷歌翻译